<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button id="test">go</button>
  <button id="box">go2</button>
  <button id="reload">reload</button>
  <script>
    test.onclick = function() {
      location.assign('http://www.jd.com')// 留历时记录
    }
    box.onclick = function() {
      location.replace('https://www.jd.com')  // 不留历时记录
    }
    reload.onclick = function() {
      location.reload(true)
    }
  </script>
</body>
</html>